package com.aote.entity.entityfinder;

import javax.servlet.http.HttpServletRequest;

import org.w3c.dom.Element;

import com.browsesoft.Entity;
import com.browsesoft.baseadapter.AdvancedSimpleEntity;
import com.browsesoft.htmlcomponent.HTMLBasicComponent;
import com.browsesoft.util.ComponentHelper;

public class AttributeEntityFinder implements EntityFinder {

	public Entity getEntity(HttpServletRequest request, Element element,
			HTMLBasicComponent component) {
		AdvancedSimpleEntity model = (AdvancedSimpleEntity) component
				.getParent().getModel();
		Entity entity = ComponentHelper.getEntity(element, model);
		return entity;
	}
}
